package com.service.bracelet.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.service.bracelet.common.CommonResult;
import com.service.bracelet.entity.Lumen;

import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;

/**
 * 流明服务
 */
public interface ILumenService extends IService<Lumen> {
    /**
     * 批量保存流明信息
     *
     * @param userId
     * @param params
     */
    void saveList(int userId, Map<String, Object> params);

    /**
     * 查询流明数据
     *
     * @param params
     * @return
     */
    CommonResult<List<Map<String, Object>>> queryList(Map<String, Object> params);
    
    /**
     * 查询流明数据，统计每段流明的数据量
     *
     * @param params
     * @return
     * @throws IOException 
     */
    List<Object[]> queryExportData(Map<String, Object> params) throws IOException;
    
    /**
     * 查询流明数据，每5分钟的数据做一个平均值
     *
     * @param params
     * @return
     * @throws IOException 
     */
    List<Object[]> queryExportDataForAvg(Map<String, Object> params) throws IOException;
}
